package wnhz.com.business.freeshop.activity.fourthfree;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import wnhz.com.business.R;
import wnhz.com.business.base.BaseActivity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.view.TranslucentActionBar;
import wnhz.com.business.view.TranslucentActionBarW;

public class AddBankCardActivity extends BaseActivity implements ActionBarClickListener {

    @BindView(R.id.actionbar)
    TranslucentActionBarW actionbar;
    @BindView(R.id.et_name)
    EditText etName;
    @BindView(R.id.et_cardnumber)
    EditText etCardnumber;
    @BindView(R.id.tv_next)
    TextView tvNext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_bank_card_f);
        ButterKnife.bind(this);
        actionbar.setData("选择银行卡", R.drawable.ic_left_back, null, 0, null, 0, this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

            actionbar.setStatusBarHeight(getStatusBarHeight());
        }


    }


    public static Intent createIntent(Context context) {
        Intent intent = new Intent(context, AddBankCardActivity.class);
        return intent;
    }


    @Override
    public void onLeftClick() {
        finish();

    }

    @Override
    public void onRightClick() {


    }

    @Override
    public void onEditTextClick() {

    }

    @OnClick(R.id.tv_next)
    public void onViewClicked() {

        if (etName.getText().toString().equals("")||etName.getText().toString()==null&&
                etCardnumber.getText().toString().equals("")||etCardnumber.getText().toString()==null)
        {
            MyToast("请完善信息");
        }else
            {
                startActivity(YanZhengCardActivity.createIntent(this));
            }

    }
}
